nl.justobjects.pushlet.core
Class Subscription

java.lang.Object
  extended by nl.justobjects.pushlet.core.Subscription
All Implemented Interfaces:
ConfigDefs

public class Subscription
extends java.lang.Object
implements ConfigDefs

Represents single subject subscription

Version:
$Id: Subscription.java,v 1.5 2007/11/23 14:33:07 justb Exp $
Author:
Just van den Broecke - Just Objects ©

Field Summary
static int ID_SIZE
           
static java.lang.String SUBJECT_SEPARATOR
           
 
Fields inherited from interface nl.justobjects.pushlet.core.ConfigDefs
CONTROLLER_CLASS, DISPATCHER_CLASS, LISTEN_FORCE_PULL_AGENTS, LISTEN_FORCE_PULL_ALL, LOG_LEVEL, LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_WARN, LOGGER_CLASS, POLL_REFRESH_TIMEOUT_MILLIS, POLL_REFRESH_WAIT_MAX_MILLIS, POLL_REFRESH_WAIT_MIN_MILLIS, PULL_REFRESH_TIMEOUT_MILLIS, PULL_REFRESH_WAIT_MAX_MILLIS, PULL_REFRESH_WAIT_MIN_MILLIS, QUEUE_READ_TIMEOUT_MILLIS, QUEUE_SIZE, QUEUE_WRITE_TIMEOUT_MILLIS, SESSION_CLASS, SESSION_ID_GENERATION, SESSION_ID_GENERATION_RANDOMSTRING, SESSION_ID_GENERATION_UUID, SESSION_ID_SIZE, SESSION_MANAGER_CLASS, SESSION_TIMEOUT_MINS, SOURCES_ACTIVATE, SUBSCRIBER_CLASS, SUBSCRIPTION_CLASS
 
Method Summary
static Subscription create(java.lang.String aSubject)
          Create instance through factory method.
static Subscription create(java.lang.String aSubject, java.lang.String aLabel)
          Create instance through factory method.
 java.lang.String getId()
           
 java.lang.String getLabel()
           
 java.lang.String getSubject()
           
 boolean match(Event event)
          Determine if Event matches subscription.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_SIZE

public static final int ID_SIZE
See Also:
Constant Field Values

SUBJECT_SEPARATOR

public static final java.lang.String SUBJECT_SEPARATOR
See Also:
Constant Field Values
Method Detail

create

public static Subscription create(java.lang.String aSubject)
                           throws PushletException
Create instance through factory method.

Parameters:
aSubject - the subject (topic).
Returns:
a Subscription object (or derived)
Throws:
PushletException - exception, usually misconfiguration

create

public static Subscription create(java.lang.String aSubject,
                                  java.lang.String aLabel)
                           throws PushletException
Create instance through factory method.

Parameters:
aSubject - the subject (topic).
aLabel - the subject label (optional).
Returns:
a Subscription object (or derived)
Throws:
PushletException - exception, usually misconfiguration

getId

public java.lang.String getId()

getLabel

public java.lang.String getLabel()

getSubject

public java.lang.String getSubject()

match

public boolean match(Event event)
Determine if Event matches subscription.